package com.geekca.d8;

public class TestString {
    public static void main(String[] args) {
//        String str = "极客咖:";
//        System.out.println(str);
//        String str2 = new String("马斯克 ");
//        str += "hello";
//        System.out.println(str);

        testStr();

        int a = 500000;
        int b = 500000;
        System.out.println(a == b);
    }

    public static void testStr() {
        String str = "极客咖";
        String str2 = new String("极客咖");

        System.out.println(str == str2);
        System.out.println("字符串内容比较:" + str.equals(str2));

        String info = "tom";
        String info2 = "Tom";
        System.out.println("忽略大小写比较值:" + info.equalsIgnoreCase(info2));
    }
}
